

/**
 * 节流函数
 */
export const throttle = (fn, wait) => {
  let timer = null;
  return function(){
      let context = this;
      let args = arguments;
      if(!timer){
          timer = setTimeout(function(){
              fn.apply(context, args);
              timer = null;
          },wait)
      }
  }
}

/**
 * 两数相差是否小于指定值
 */
// export const differ = (num1, num2, diff) => {

// }